﻿@model Orion.Models.HomeIndexViewModel

@{
    ViewBag.Title = "IRIS - " + Model.MainNewsArticle.Title;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script src="@Url.Content("~/Scripts/Pagination/jquery.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Pagination/jquery.pagination.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Pagination/jquery.pag.js")" type="text/javascript"></script>

<section id="main_content">

    <article id="full_article">
         @{DateTime temp = Model.MainNewsArticle.ContentDate; }
        <h1>
            @Model.MainNewsArticle.Title
            <span class="right"><a target="_blank" title="Prenta grein" href="/NewsArticle/PrintNewsArticleById/@Model.MainNewsArticle.ID"><img class="print" src="@Url.Content("~/Content/images/print.png")" /></a></span>
        </h1>
        <span class="left">@Model.MainNewsArticle.Author</span>
        <span class="right"> @temp.ToString("dd MMMM yyyy")</span>
        <div class="clear"></div>
        <div>
        @if (Model.MainNewsArticle.Picture != "no pic" && Model.MainNewsArticle.Picture != null && Model.MainNewsArticle.ContentType == 2)
        {
            <img class="imgInTextLeft" id="imgInFullNews"  src="@Model.MainNewsArticle.Picture" alt="@Model.MainNewsArticle.Picture" />
        }
        @Html.Raw(Model.MainNewsArticle.TextBody)</div>
        <a href="#" onclick="window.open('http://www.facebook.com/sharer.php?u=@Request.Url.GetLeftPart(UriPartial.Authority)/NewsArticle/NewsArticleById/@Model.MainNewsArticle.ID', 'FbShare', 'height=400, width=500, toolbar=0, menubar=0, scrollbars=0, resizable=0, location=0, directories=0, status=0')" style="text-decoration: none"><img src="@Url.Content("~/content/images/facebook_share_icon.gif")" border="0" title="Deila á Facebook" align="absmiddle"> <b>Deila á Facebook</b></a>
        <p><a href="javascript:javascript:history.go(-1)"><< Til baka</a></p>
    </article>
    
    <div class="other_articles">
        <h1> Aðrar greinar eftir @Model.MainNewsArticle.Author</h1>
    @foreach (var na in Model.NewsArticle )
    {
        <ul>
            <h3><a href="/NewsArticle/NewsArticleById/@na.ID">@na.Title</a></h3>
            <div class="shortenMeAdrarGreinar">@Html.Raw( na.TextBody )</div>
            <b><a href="/NewsArticle/NewsArticleById/@na.ID">Lesa Meira >></a></b>
        </ul>
        
    }
    </div>
    
</section>